﻿<UserControl
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
             xmlns:ctrl="clr-namespace:MediaOwl.Common.ControlTemplates;assembly=MediaOwl.Common" x:Class="MediaOwl.Cryptos.Views.RijndaelChiffreView"
             mc:Ignorable="d"
             d:DesignHeight="515"
             d:DesignWidth="657">
	<UserControl.Resources>
		<DataTemplate x:Key="NumericUpDownItemDataTemplate">
			<toolkit:NumericUpDown Height="Auto" MinHeight="30" Maximum="255" Value="{Binding Value, Mode=TwoWay}" Width="63" Margin="2" FontSize="12"/>
		</DataTemplate>
	</UserControl.Resources>

    <ctrl:WorkitemControl BusyContext="{Binding CurrentBusyViewModel}"
                          DialogContext="{Binding ActiveDialog}">
    	<toolkit:DockPanel Margin="5">
    		<toolkit:DockPanel toolkit:DockPanel.Dock="Top" Margin="0,0,0,15">
    			<TextBlock x:Name="DisplayName"
    				TextWrapping="Wrap"
    				toolkit:DockPanel.Dock="Left"
    				Style="{StaticResource Heading2}" />
    			<Button x:Name="ShowDescription" Content="Info" Width="75" HorizontalAlignment="Right" VerticalAlignment="Center"/>
    		</toolkit:DockPanel>
    		<ScrollViewer toolkit:DockPanel.Dock="Top" ScrollViewer.VerticalScrollBarVisibility="Auto">
    			<toolkit:DockPanel Margin="5" LastChildFill="False">
    				<toolkit:DockPanel toolkit:DockPanel.Dock="Top"
    					LastChildFill="False" Margin="0,0,0,15">
    					<TextBlock Text="Initialization Vector:"
    						toolkit:DockPanel.Dock="Top" Style="{StaticResource Heading4}" />
    					<ItemsControl toolkit:DockPanel.Dock="Top" ItemsPanel="{StaticResource WrappingItemsPanelTemplate}" ItemTemplate="{StaticResource NumericUpDownItemDataTemplate}" ItemsSource="{Binding IvList, Mode=TwoWay}"/>
    					<TextBlock Text="Key:"
    						Margin="0,10,0,0"
    						d:LayoutOverrides="Height"
    						toolkit:DockPanel.Dock="Top" Style="{StaticResource Heading4}" />
    					<ItemsControl toolkit:DockPanel.Dock="Top" ItemsPanel="{StaticResource WrappingItemsPanelTemplate}" ItemTemplate="{StaticResource NumericUpDownItemDataTemplate}" ItemsSource="{Binding KeyList, Mode=TwoWay}"/>
    					<toolkit:DockPanel LastChildFill="False"
    						toolkit:DockPanel.Dock="Top" Margin="0,10,0,0">
    						<CheckBox IsChecked="{Binding Encrypt, Mode=TwoWay}"
    							Content="Encrypt"
    							d:LayoutOverrides="Height"
    							VerticalAlignment="Center"
    							Margin="0,0,20,0" />
    						<CheckBox IsChecked="{Binding Decrypt, Mode=TwoWay}"
    							Content="Decrypt"
    							d:LayoutOverrides="Height"
    							VerticalAlignment="Center" />
    						<Button x:Name="Execute"
    							Content="Execute"
    							VerticalAlignment="Center"
    							Margin="0"
    							toolkit:DockPanel.Dock="Right" />
    					</toolkit:DockPanel>
    				</toolkit:DockPanel>
    				<toolkit:DockPanel toolkit:DockPanel.Dock="Top"
    					LastChildFill="False" Margin="0,0,0,15">
    					<TextBlock Text="Enter Text here:"
    						FontSize="16"
    						VerticalAlignment="Top"
    						toolkit:DockPanel.Dock="Top" Style="{StaticResource Heading4}" />
    					<TextBox x:Name="TextInput"
    						Background="#7E000000"
    						toolkit:DockPanel.Dock="Top"
    						AcceptsReturn="True"
    						VerticalScrollBarVisibility="Auto"
    						FontSize="14.667"
    						MaxLength="1500" Foreground="{StaticResource NormalFontBrush}" MinHeight="100" MaxHeight="150" TextWrapping="Wrap" />
    				</toolkit:DockPanel>
    				<toolkit:DockPanel toolkit:DockPanel.Dock="Top"
    					LastChildFill="False">
    					<toolkit:DockPanel VerticalAlignment="Top"
    						toolkit:DockPanel.Dock="Top">
    						<TextBlock Text="Result:"
    							VerticalAlignment="Bottom" Style="{StaticResource Heading4}" />
    						<Button x:Name="MoveInput"
    							Content="Copy to Input"
    							d:LayoutOverrides="Height"
    							toolkit:DockPanel.Dock="Right"
    							HorizontalAlignment="Right"
    							FontSize="13.333"
    							VerticalAlignment="Top"
    							Margin="8,0,0,3" />
    					</toolkit:DockPanel>
    					<TextBox x:Name="Result"
    						Background="#7E000000"
    						toolkit:DockPanel.Dock="Top"
    						IsReadOnly="True"
    						AcceptsReturn="True"
    						VerticalScrollBarVisibility="Auto"
    						FontSize="14.667" Foreground="{StaticResource NormalFontBrush}" MinHeight="100" MaxHeight="150" TextWrapping="Wrap" />
    				</toolkit:DockPanel>
    			</toolkit:DockPanel>
    		</ScrollViewer>
    	</toolkit:DockPanel>
    </ctrl:WorkitemControl>
</UserControl>
